package com.enjoyor.soa.traffic.api.dto.collectms;

import com.enjoyor.soa.traffic.util.bean.base.ABean;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
 * 运维Dto
 */
public class DeviceStatusDto extends ABean {

  private String devId;

  /**
   * 0正常 1异常
   */
  private String status;

  private String type;

  private String collectTime;

  private String receiveTime;

  private String writeDbTime;


  public String getDevId() {
    return devId;
  }

  public void setDevId(String devId) {
    this.devId = devId;
  }

  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public String getCollectTime() {
    return collectTime;
  }

  public void setCollectTime(String collectTime) {
    this.collectTime = collectTime;
  }

  public String getReceiveTime() {
    return receiveTime;
  }

  public void setReceiveTime(String receiveTime) {
    this.receiveTime = receiveTime;
  }

  public String getWriteDbTime() {
    return writeDbTime;
  }

  public void setWriteDbTime(String writeDbTime) {
    this.writeDbTime = writeDbTime;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }

    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    DeviceStatusDto that = (DeviceStatusDto) o;

    return new EqualsBuilder()
        .append(devId, that.devId)
        .append(status, that.status)
        .append(type, that.type)
        .append(collectTime, that.collectTime)
        .append(receiveTime, that.receiveTime)
        .append(writeDbTime, that.writeDbTime)
        .isEquals();
  }

  @Override
  public int hashCode() {
    return new HashCodeBuilder(17, 37)
        .append(devId)
        .append(status)
        .append(type)
        .append(collectTime)
        .append(receiveTime)
        .append(writeDbTime)
        .toHashCode();
  }
}
